<?php $this->_extends('../_layouts/blank_layout'); ?>
<?php $this->_block('contents'); ?>
<script type="text/javascript">
$(function(){
	$(".datepicker").datepicker({dateFormat:'yy-mm-dd',changeMonth:true});
});
</script>
<h2>修改退款单信息</h2>
<form method="post" action="<?=url('Finance::Business/RefundEditSave')?>">
<table class="form_table">
<tr>
	<th>退款类型</th>
	<td>
		<select name="type">
			<option value="-1">-</option>
			<option value="1" <?if ($sales_refund['type'] == '1') echo "selected='selected'"?>>+</option>
		</select>
	</td>
	<th>退款金额</th>
	<td><input type="text" name="refund_amount" value="<?=isset($sales_refund['refund_amount']) ? $sales_refund['refund_amount'] : ''?>" /></td>
</tr>
<tr>
	<th>退款账号</th>
	<td><input type="text" name="refund_account" size="30" value="<?=isset($sales_refund['refund_account']) ? $sales_refund['refund_account'] : ''?>" /></td>
	<th>收款交易号</th>
	<td><input type="text" name="receive_transaction_id" value="<?=isset($sales_refund['receive_transaction_id']) ? $sales_refund['receive_transaction_id'] : ''?>" /></td>
</tr>
<tr>
	<th>退款方式</th>
	<td>
		<select name="refund_method">
			<option value="">请选择..</option>
			<?foreach (Q::ini('custom_flag/sales_order_payment_method') as $pm):?>
			<option <?if($sales_refund['refund_method'] == $pm['value']) echo "selected='selected'"?> value="<?=$pm['value']?>"><?=$pm['name']?></option>
			<?endforeach;?>
		</select>
	</td>
	<th>商品类别</th>
	<td><input type="text" name="categories_name" value="<?=isset($sales_refund['categories_name']) ? $sales_refund['categories_name'] : ''?>" /></td>
</tr>
<tr>
	<th>退款原因</th>
	<td>
		<select name="reason">
			<option value="">请选择..</option>
			<?foreach (Q::ini('custom_flag/sales_refund_reason') as $srr):?>
			<option value="<?=$srr['value']?>" <?if ($sales_refund['reason'] == $srr['value']) echo "selected='selected'"?>><?=$srr['name']?></option>
			<?endforeach;?>
		</select>
	</td>
	<th>备注</th>
	<td colspan="3"><textarea name="notes" rows="3" cols="22"><?=isset($sales_refund['notes']) ? $sales_refund['notes'] : ''?></textarea></td>
</tr>
<tr>
	<th><input type="hidden" name="id" id="refund_id" value="<?=$sales_refund['id']?>" /></th>
	<td colspan="2"><input type="submit" value="提交退款单" class="button" /></td>
</tr>
</table>
</form>
<?php $this->_endblock(); ?>